-- GENERATED SPELL FOR [Coilfang Priestess] --


function spell0_21220(pUnit, Event) --@Greater Heal,Heal--
pUnit:FullCastSpellOnTarget(38580,pUnit)
pUnit:RegisterEvent('Sorts_21220', 2000, 1)
end

function spell1_21220(pUnit, Event) --@Holy Fire,n/a--
pUnit:FullCastSpellOnTarget(38585,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21220', 8000, 1)
end

function spell2_21220(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(38582,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21220', 671, 1)
end

function Sorts_21220(pUnit, Event)
local choix_sorts_21220 = math.random(0, 2)
if choix_sorts_21220 == 0 then
pUnit:RegisterEvent('spell0_21220', 1, 1)
end
if choix_sorts_21220 == 1 then
pUnit:RegisterEvent('spell1_21220', 1, 1)
end
if choix_sorts_21220 == 2 then
pUnit:RegisterEvent('spell2_21220', 1, 1)
end
end

function mob21220_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21220', math.random(1500, 3000), 1)
end

function mob21220_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21220_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21220_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21220, 1, 'mob21220_Action')
RegisterUnitEvent(21220, 2, 'mob21220_Leave')
RegisterUnitEvent(21220, 3, 'mob21220_Kill')
RegisterUnitEvent(21220, 4, 'mob21220_Die')
